/**
 * Created by zhangyunqi on 2017/6/6.
 */
import java.io.*;
public class MyOdABC
{
    public static void dump(InputStream src)
            throws IOException {
        try (InputStream input = src) {
            byte[][] data = new byte[50][1];
            byte[][] transf = new byte[50][1];
            int i=0, j=0, num;
            System.out.print("00010: ");
            while (input.read(data[i]) != -1) {
                num = (int)data[i][0];
                System.out.printf("%5s", Integer.toHexString(num));
                i++;
            }
            System.out.print("00010: ");
            while (input.read(data[i]) != -1) {
                num = (int)data[i][0];
                System.out.printf("%5s", Integer.toHexString(num));
                i++;
            }

            System.out.print("\n00020: ");
            while (j<i) {
                transf[j][0] = (byte)(data[j][0] - 0x30);
                System.out.printf("%5d", transf[j][0]);
                j++;
            }
            System.out.println();
        }
    }
    public static void main(String[] args) {
        FileInputStream fis = null;
        try {
            fis = new FileInputStream("/Users/zhangyunqi/Desktop/zyq.txt");
            dump(fis);
        }catch(Exception e) {
            System.out.println(e);
        }
    }
}
